home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 138 / 138.xpi / chrome / stumbleupon.jar / content / signoutDialog.js < prev    next >
Text File  |  2009-05-22  |  625b  |  34 lines

  1. var detail; 
  2.  
  3. function init()
  4. {
  5.     // get object from parent window
  6.     detail = window.arguments[0];
  7.     detail.response = 0;
  8.     
  9.     var forgot_button = document.getElementById("stumble_signout_dialog").getButton("extra1");
  10.     
  11.     forgot_button.label = "Forgot Password";
  12.     forgot_button.setAttribute("oncommand", "forgotPassword();");
  13. }
  14.  
  15. function forgotPassword()
  16. {
  17.     var doc = opener.getBrowser().contentDocument;
  18.     close();
  19.     doc.location = opener.su_base_url + "recover_password.php";
  20. }
  21.  
  22. function doOK()
  23. {
  24.     // Other responses fail silently?
  25.     detail.response = 1;
  26.     return true;
  27. }
  28.  
  29. function doCancel()
  30. {
  31.     detail.response = 0;
  32.     return true;
  33. }
  34.